//
//  NSObject+Extentsion.m
//  MobileShoppingMall
//
//  Created by 冯传昌 on 2021/4/14.
//  Copyright © 2021 冯传昌. All rights reserved.
//

#import "NSObject+Extentsion.h"

#import <UIViewControllerCJHelper.h>

@implementation NSObject (Extentsion)

///判断字符串是否为空
-(BOOL)isEmpty{
    if (self == nil || self == NULL) {
        return YES;
    }
    if ([self isKindOfClass:[NSNull class]]) {
        return YES;
    }
    if ([[(NSString *)self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] length]==0) {
        return YES;
    }
    return NO;
}

///判断数据是否为空
-(BOOL)isNull{
    if (self == nil || self == NULL) {
        return YES;
    }
    if ([self isKindOfClass:[NSNull class]]) {
        return YES;
    }
    return NO;
}


@end
